package com.clementheliou.cheliou.business.functional.member;

import com.clementheliou.cheliou.business.dataaccess.member.exception.EMailAlreadyUsedException;
import com.clementheliou.cheliou.dal.model.member.Member;

/**
 * Functional service about the members. All the methods implementations should contain a functional
 * behavior; that is to say more than an access to the model layer. This kind of service may depend
 * on the data access ones and can be used both by web layer and others functional services.
 * 
 * @author Clément HELIOU (clement.heliou@gmail.com)
 * @since 1.0
 */
public interface MemberFunctionalService {

	/**
	 * Adds a candidate member with the "user" role.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @param memberToAdd the data of the candidate member.
	 * @see {@link Member}.
	 * @since 1.0
	 * @throws EMailAlreadyUsedException if the candidate's email is still used according to the
	 *             data access layer.
	 */
	void addUserMember(Member memberToAdd) throws EMailAlreadyUsedException;
}
